const path = require('path')
const webpack = require('webpack')

function resolve(dir) {
  return path.resolve(dir)
}
module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  lintOnSave: false,
  devServer: {
    overlay: {
      warnings: true,
      errors: true
    }
  },
  configureWebpack: {
    resolve: {
      extensions: ['.js', '.vue', '.json'],
      alias: {
        '@': resolve('src'),
        '~': process.cwd(),
        public: resolve('public'),
        components: resolve('src/components'),
        util: resolve('src/static/utils'),
        store: resolve('src/store'),
        router: resolve('src/router'),
      }
    },
  }
}